import request from "../utils/request";
const BASE_URL = "maimao_upload";
export default {

    /**
     * 普通用户开店上传证件照
     */
    uploadIdImage(file, type) {
        return request({
            url: `${BASE_URL}/upload/member/id-card?type=${type}`,
            method: 'post',
            data: file
        })
    },

    /**
     * 通用上传照片
     */
    uploadCommon(file,limit) {
        return request({
            url: `${BASE_URL}/upload/image?limit=${limit}`,
            method: 'post',
            data: file
        })
    },


    /**
     * markdown文章中多个文件上传
     * @param {*} formdata
     */
    uploadFileList(formdata){
        return request({
            url:`${BASE_URL}/upload/files`,
            method:'post',
            data:formdata,
            headers: { "Content-Type": "multipart/form-data" }
        })
    }

}

